home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / TEST-VID.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  1KB  |  36 lines

  1. ' TEST-VID.BAS
  2. ' This program determines what screen modes your video adapter supports.
  3.  
  4. DIM okModes%(18)               ' array to hold video modes being tested
  5.  
  6. CLS
  7.  
  8. ON ERROR GOTO CannotSetMode:   ' tell the QBI what to do in case
  9.                                '   it encounters an error
  10.  
  11. FOR i% = 0 TO 13               ' try to set the video adapter in
  12.     SCREEN i%                  '   all 13 modes; if an error occurs
  13.     IF errorCode% = 0 THEN     '   (meaning that mode isn't supported),
  14.         okModes%(i%) = 1       '   then jump to the end of the program
  15.         bestMode% = i%
  16.     END IF
  17.     errorCode% = 0
  18. NEXT i%
  19.  
  20. SCREEN bestMode%               ' set best video mode for display
  21.  
  22. PRINT bestMode%
  23. FOR i% = 0 TO 13
  24.     IF okModes%(i%) = 1 THEN
  25.         PRINT "You can use mode"; i%; "with your computer."
  26.     END IF
  27. NEXT i%
  28.  
  29. END
  30.  
  31. CannotSetMode:           ' "dummy" routine to handle error trapping
  32.     errorCode% = 1       '   (to prevent the QuickBASIC Interpreter from
  33.     RESUME NEXT          '   stopping and displaying and error message)
  34.                      
  35.  
  36.